package com.zusmart.base.scanner.support;

import java.util.jar.JarEntry;
import java.util.jar.JarFile;

import com.zusmart.base.scanner.ScannerResultForClass;

public class ScannerResultForJarClass extends AbstractScannerResult implements ScannerResultForClass {

	private final Class<?> clazz;

	protected ScannerResultForJarClass(JarFile jarFile, JarEntry jarEntry, Class<?> clazz, String path) {
		super(getFileName(jarEntry), path);
		this.clazz = clazz;
	}

	@Override
	public boolean isClass() {
		return true;
	}

	@Override
	public boolean isResource() {
		return false;
	}

	@Override
	public boolean isFromJarFile() {
		return true;
	}

	@Override
	public boolean isFromDirFile() {
		return false;
	}

	@Override
	public Class<?> getTargetClass() {
		return this.clazz;
	}

}